package com.lvjian.community.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lvjian.community.dao.UserAssociationRoleMapper;
import com.lvjian.community.domain.UserAssociationRole;
import com.lvjian.community.service.UserAssociationRoleService;

/**
 * 用户与角色关联实现
 */
@Service
public class UserAssociationRoleServiceImpl implements UserAssociationRoleService {

    @Autowired
    private UserAssociationRoleMapper userAssociationRoleMapper;

    @Override
    public boolean insertUserAssociationRole(UserAssociationRole userAssociationRole) {
        return userAssociationRoleMapper.insertUserAssociationRole(userAssociationRole) == 1;
    }

    @Override
    public int selectRoleId(Integer userId) {
        return userAssociationRoleMapper.selectRoleId(userId);
    }

}
